package com.eightworld3.supermarket.service;

import com.eightworld3.supermarket.domain.WareInfo;
import com.eightworld3.supermarket.service.dto.WareInfoDTO;
import com.eightworld3.supermarket.service.dto.add.WareInfoAddDTO;
import com.eightworld3.supermarket.service.dto.result.ResponseResult;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author EightWorld3
 */
@Service
public interface WareInfoService {
    /**
     * 查询所有
     * @return 返回所有WareInfo(商品信息)
     */
    List<WareInfo> selectAll();

    /**
     * 根据wareId查询WareInfo
     * @param wareId ID号
     * @return 返回wareId对应的WareInfo对象(经ResponseResult包装类修饰)
     */
    ResponseResult selectByWareId(Integer wareId);

    /**
     * 新增WareInfo
     * @param wareInfoAddDTO WareInfo新增DTO对象
     * @return 返回当前当次新增状况(经ResponseResult包装类修饰)
     */
    ResponseResult addWareInfo(WareInfoAddDTO wareInfoAddDTO);

    /**
     * 修改WareInfo
     * @param wareInfoDTO WareInfo DTO对象
     * @return 返回当前当次更新状况(经ResponseResult包装类修饰)
     */
    ResponseResult updateWareInfo(WareInfoDTO wareInfoDTO);

    /**
     * 删除WareInfo
     * @param wareId ID号
     * @return 返回当前当次删除状况(经ResponseResult包装类修饰)
     */
    ResponseResult deleteWareInfoByWareId(int wareId);
}
